<?php
/**
 *
 * User: chenzheng
 * Date: 2023/5/8
 * Time: 16:06
 */

namespace app\api\controller;


use app\api\model\MallWechat;
use app\api\library\wechat\getJsapiSign;
use app\api\library\wechat\getOpenId;
use app\common\controller\IndexController;

class Wechat extends IndexController
{
    /**
     * 获取JsapiSign
     */
    public function getJsapiSign()
    {
        $req = $this->run(WEB_KEY);
//        $req = request()->param();
        //处理参数
        $display = [
            ['jumpUrl', 'ju', 'str'],
        ];
        //校验参数
        $param = _displayParam($req, $display);
        
        
        getJsapiSign\V::run($param);
    }
    
    /**
     * 获取openid
     */
    public function getOpenId()
    {
        $req = $this->run(WEB_KEY);
//        $req = request()->param();
        //处理参数
        $display = [
            ['code', 'ce', 'str'],
//            ['redirect', 'rt', 'str'],
        ];
        //校验参数
        $param = _displayParam($req, $display);
        
        
        getOpenId\V::run($param);
        
        
    }
}